package com.foreverwin.mes.production.mapper;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.foreverwin.mes.production.model.WorkCenterShift;
import com.foreverwin.mes.production.model.WorkCenterShiftView;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 工作中心班次设定 Mapper 接口
 * </p>
 *
 * @author syngna
 * @since 2018-12-14
 */
@Repository
public interface WorkCenterShiftMapper extends BaseMapper<WorkCenterShift> {

    /**
     * 根据工作中心查询有效班次
     *
     * @param site
     * @param workCenter
     * @return
     */
    List<WorkCenterShiftView> selectEnabledShiftsByWorkCenter(@Param("site") String site, @Param("workCenter") String workCenter, @Param("locale") String locale);

    List<WorkCenterShiftView> selectWCShiftList(@Param("site") String site, @Param("workCenter") String workCenter, @Param("locale") String locale);

    int updateByHandles(@Param("list") List<String> list, @Param("status") String status, @Param("modifyUser") String modifyUser, @Param("modifiedDateTime") Date modifiedDateTime);

}